Introduction
Notification preferences is a setting that allows patients or customers to opt in or out of different types of notifications (Email and SMS — configurable) for different services. It is used as a lookup table, primarily to ensure that the choices of users who have opted out of certain notification types and their related services are respected prior to sending out notifications. By default, a patient or customer is automatically signed up for all notifications except those they explicitly opt out of. There is a provision to opt in afterwards.
This module provides a flexible and secure way for users to manage how they receive communications from different services within the system. It helps ensure compliance with privacy regulations, improves user satisfaction by respecting communication preferences, and offers administrative visibility into customer notification settings.
Purpose
The purpose of this module is to:
- Centralize customer preferences for notifications.
- Enable easy opt-in/opt-out mechanisms per notification type per service.
- Provide audit trails for when and how preferences were changed.
General Overview of Operation
- A notification service is created in the database (e.g., rating) — stored in the
notification_servicestable. - An entry is made to the
notification_preferencestable, recording thenotification_type(email or SMS),status(opted in or opted out), the notification_service, and an optional reason. - Whenever a notification is about to be sent to a patient or customer, this table is quickly looked up to check if the recipient has opted out of the specific notification type for a particular service before sending the notification.
Features
- Granular Preferences: Customers can opt in or out of specific services and notification types (e.g., rating emails vs. rating sms).
- Tokenized Opt-Out Links: Secure, login-free opt-out functionality via links sent in messages.
- Admin Visibility: System users can view and manage preferences for customer support or compliance needs.
- Audit Timestamps: Tracks when preferences were created or updated.
- Multi-Service Support: Allows services to be managed independently (e.g., Rating, Waitlist, Appointment).
Use Case Example
- A customer is automatically subscribed to all notifications after signup.
- Later, the customer clicks an "optout/unsubscribe" link in an email, which triggers a secure opt-out process.
- Their
NotificationPreferenceis updated toOPTED_OUTand an optional reason is logged.
Summary
This system ensures smooth usage of the application by respecting patients' or customers' notification preferences and preventing unwanted communications.